import request from '@/utils/request'

// 查询人员台账列表
export function listPerson(query) {
  return request({
    url: '/business/person/list',
    method: 'get',
    params: query
  })
}

// 查询人员台账详细
export function getPerson(id) {
  return request({
    url: '/business/person/' + id,
    method: 'get'
  })
}

// 新增人员台账
export function addPerson(data) {
  return request({
    url: '/business/person',
    method: 'post',
    data: data
  })
}

// 修改人员台账
export function updatePerson(data) {
  return request({
    url: '/business/person',
    method: 'put',
    data: data
  })
}

// 删除人员台账
export function delPerson(id) {
  return request({
    url: '/business/person/' + id,
    method: 'delete'
  })
}
  // 查询班组
  export function Teamlist() {
    return request({
      url: '/business/team/teamlist',
      method: 'get',
     
    })
  }

// 根据班组id，查询对应班组的人
export function getTeamPerson(id) {
  return request({
    url: '/business/person/' + id,
    method: 'post'
  })
}


// 获取对应岗位的人员
export function getPostPerson(postId) {
  return request({
    url: '/business/person//getPersonList/' + postId,
    method: 'post'
  })
}